<?php
    require_once('../includes/DbConnector.php');
    if(isset($_GET['action']) && !empty($_GET['action'])) {
        // INPUT DATA.
        $action = $_GET['action'];
        $connector  = new DbConnector();
        $sql = "select 
                ua.username,
                ua.email,
                ua.first_name,
                ua.last_name,
                ua.password,
                us.name status_name,
                ua.account_type
                from user_account ua, user_status us
                where ua.status_id = us.status_id";
        $result = $connector->query($sql);
        
        $a=array();
        while($row = mysql_fetch_array($result)){
            array_push($a,$row);
        }
        echo json_encode($a);
    }
?>